add_library(lf-low-level-platform-api INTERFACE)
target_include_directories(lf-low-level-platform-api INTERFACE ${CMAKE_CURRENT_LIST_DIR})
add_library(lf::low-level-platform-api ALIAS lf-low-level-platform-api)
target_link_libraries(lf-low-level-platform-api INTERFACE lf::tag-api)

if(${CMAKE_SYSTEM_NAME} STREQUAL "nRF52")
    target_compile_definitions(lf-low-level-platform-api INTERFACE PLATFORM_NRF52)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Zephyr")
    target_compile_definitions(lf-low-level-platform-api INTERFACE PLATFORM_ZEPHYR)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Rp2040")
    target_compile_definitions(lf-low-level-platform-api INTERFACE PLATFORM_RP2040)
    target_link_libraries(lf-low-level-platform-api INTERFACE pico_stdlib)
    target_link_libraries(lf-low-level-platform-api INTERFACE pico_multicore)
    target_link_libraries(lf-low-level-platform-api INTERFACE pico_sync)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FlexPRET")
    target_compile_definitions(lf-low-level-platform-api INTERFACE PLATFORM_FLEXPRET)
    target_link_libraries(lf-low-level-platform-api INTERFACE fp-sdk)
endif()
